package com.atguigu.eduservice.service;

import com.atguigu.eduservice.entity.EduCourse;
import com.atguigu.eduservice.entity.EduCourseInfoForm;
import com.atguigu.eduservice.query.CourseQuery;
import com.atguigu.eduservice.vo.CoursePublishVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * 课程管理接口类
 */
public interface EduCourseService extends IService<EduCourse> {

    //新增课程基本信息
    String saveCourseInfo(EduCourseInfoForm eduCourseInfoForm);

    //根据id获取课程信息
    EduCourseInfoForm getCourseInfoFormById(String id);

    //根据id修改课程信息
    void updateCourseInfoById(EduCourseInfoForm eduCourseInfoForm);

    //根据id获取课程发布信息
    CoursePublishVo getCoursePublishVoById(String id);

    //根据课程id发布课程
    boolean publishCourseById(String id);

    //分页查询所有课程(mapper写法，无法计算total，因为使用的mp的IPage接口，如果是mybatis就可以计算)
    void pageQuery(Page<EduCourse> pageParam, CourseQuery courseQuery);

    //分页查询所有课程(QueryWrapper写法)
    void pageQuery2(Page<EduCourse> pageParam, CourseQuery courseQuery);

    //根据id删除课程
    boolean removeCourseById(String id);
}
